]> dgit.raspbian.org Git - gnome-shell.git/commit
polkitAgent: Only set key focus to password entry after opening dialog
authorJonas Dreßler <verdre@v0yd.nl>
Mon, 24 Jun 2019 08:57:24 +0000 (10:57 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Tue, 5 Nov 2019 17:52:33 +0000 (18:52 +0100)
commit70203b58ca5310313f01cf8ae6719ae9176c68db
tree6a791935743319e234d4836deb5803ec53a17434
parentc627d47019b0319c47e99c2ed8cd014b9bf98d62
polkitAgent: Only set key focus to password entry after opening dialog

Set the key focus to the password field only after we got a request
(and therefore know that a password is requested) instead of using
`setInitialKeyFocus()`. This way we don't try to focus the password
field by default if we aren't showing it (e.g. in case the user has no
password or is using fingerprint login).

Also we have to move the call to `grab_key_focus()` to happen after
`_ensureOpen()`, because otherwise the ModalDialog will set the focus to
one of the buttons while opening itself.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/788
js/ui/components/polkitAgent.js